Read-Only Variables Available in .htx Files
Variables that Are Settable in Forms and in .idq Files
String Variables Useful for Formatting Displayed Columns
Parameter for Use with Bookmarks
Standard CGI Variables Available
Valid Locale Identifiers
The following variables are available for use in .htx files. These are set based upon the results of the search. In addition, the other IDQ variables mentioned below can be used in the .htx file. In the detail section of the .htx file, any output columns mentioned in the CiColumns can also be used.
Read-Only Variables Available in .htx Files:
Variable Name | Meaning |
---|---|
CiBookmark | Reference to the first row on the page. |
CiContainsFirstRecord | Set to 1 if this page contains the first record of the query results; 0 otherwise. |
CiContainsLastRecord | Set to 1 if this page contain the last record of the query results; 0 otherwise. For a sequential query, this will not
be accurate until after the <%enddetail%> section in the .htx file. |
CiCurrentPageNumber | Current page number of query results (that is, page number x of y pages). |
CiCurrentRecordNumber | Number displayed for current record. |
CiErrorMessage | Error message. Available only for error pages. See the Error Messages page for possible error messages. |
CiErrorNumber | Error number. Available only for error pages. |
CiFirstRecordNumber | Record number of first record on a page. |
CiLastRecordNumber | Last record number on a page. For a sequential query, this will not be accurate until after the <%enddetail%> section in the .htx file. |
CiMatchedRecordCount | Total number of records matching a query. Referring to this variable from the .htx file will force the search to use a nonsequential query. |
CiOutOfDate | Set to 1 if the content index out of date; 0 otherwise. |
CiQueryIncomplete | Set to 1 if the query could not be resolved using the content index and CiForceUseCI was set; 0 otherwise. |
CiQueryTimedOut | Set to 1 if the query exceeded the time limit for execution; 0 otherwise. |
CiQueryDate | Date (at the Web server) the query was executed. |
CiQueryTime | Time (at the Web server) the query was executed. |
CiQueryTimeZone | Time zone of the Web server. |
CiRecordsNextPage | Number of records on the next page. Referring to this variable from the .htx file will force the search to use a nonsequential query. |
CiTotalNumberPages | Total number of pages used to contain query results. Referring to this variable from the .htx file will force the search to use a nonsequential query. |
Following is the set of variables that can be set in the .idq file or as CGI variables and referred to in the .htx file. They can also be set as variables in forms, or given as parameters to a direct execution of the .idq file.
Variable Name | Meaning |
---|---|
CiCatalog | Override for the location of the catalog; defaults to the registry parameter if it is set, or to CiScope otherwise. |
CiColumns | List of output columns available in the .htx file. Format is a series of columns named by friendly names and separated by commas. Up to 50 output columns can be referred to in a single query. Properties cannot be duplicated. Different friendly names for the same property are considered duplicates. |
CiDeferNonIndexedTrimming | Some trimming of query results may be performed on individual objects after using the index to locate potential
matches. Common post-processing includes trimming to match scope, and security. When a query sorted in
descending order by rank is run, the full set of objects is examined to locate the CiMaxRecordsInResultSet top
records. Because the top records cannot include items that fail post-index trimming, many thousands of items
may have to be examined and thrown out to find the top results of a particular query, which can be very
resource-intensive. Setting CiDeferNonIndexedTrimming to TRUE will first find the CiMaxRecordsInResultSet
top records in the entire index, and then trim only that set. When this variable is set to TRUE, the number of
results returned to the user may be less than CiMaxRecordsInResultSet, even if that many records match the
query. The missing results will always be of lower rank than those returned. Although fewer results may be
returned than expected, the best results will always be returned. This flag should only be set when the scope of a query is set to the virtual root |
CiFlags | Query flags specifying the depth of search. DEEP means the directory given in CiScope and all directories below it, SHALLOW means only the directory specified in CiScope. |
CiForceUseCi | If TRUE, query will be forced to use the content index, even if the content index is out of date. |
CiLocale | Defines the locale used to issue the query. Standard HTML locale encoding is supported. |
CiMaxRecordsInResultSet | Maximum number of query results to return from a query. |
CiMaxRecordsPerPage | Maximum number of records to display on a page. |
CiRestriction | Query restriction, a description of what to search for. To display this on a page, or to use this in a URL with a query expression, see Syntax on the “HTML Extension File” page. |
CiScope | Scope, the starting directory for the search as either a virtual or physical path name. To use this in a URL with a query expression, see Syntax on the “HTML Extension File” page. |
CiSort | Sort specification. Format is a series of columns named by friendly names and followed by either [a] for
ascending order or [d] for descending order. The primary sort column is listed first, for example,
CiSort=Rank[d], FileName[a] . Setting this variable may force the search to use a nonsequential
query. |
CiTemplate | Output template (.htx) file path name (as a virtual path name). This path name must be a complete path name from the virtual root with no “.” or “..” components. |
The variables below, like those in the table above, may be set in the .idq file, but they may not refer to other parameters. They cannot be referred to in the .htx file, but are used only to format columns whose type is a vector.
Variables for Formatting Columns with Vectors:
Variable Name | Meaning |
---|---|
CiBoolVectorPrefix | String printed prior to vectors of Boolean values |
CiBoolVectorSeparator | String printed between elements of vectors of Boolean values |
CiBoolVectorSuffix | String printed after vectors of Boolean values |
CiCurrencyVectorPrefix | String printed prior to vectors of currency values |
CiCurrencyVectorSeparator | String printed between elements of vectors of currency values |
CiCurrencyVectorSuffix | String printed after vectors of currency values |
CiDateVectorPrefix | String printed prior to vectors of dates |
CiDateVectorSeparator | String printed between elements of vectors of dates |
CiDateVectorSuffix | String printed after vectors of dates |
CiNumberVectorPrefix | String printed prior to vectors of numbers |
CiNumberVectorSeparator | String printed between elements of vectors of numbers |
CiNumberVectorSuffix | String printed after vectors of numbers |
CiStringVectorPrefix | String printed prior to vectors of strings |
CiStringVectorSeparator | String printed between elements of vectors of strings |
CiStringVectorSuffix | String printed after vectors of strings |
The CiBookmarkSkipCount variable (described in the next table) is used in conjunction with CiBookmark to set an offset from the previous page of the query. It cannot be set in the .idq file; it should be set as a form variable. See Navigating Between Pages in Query Results on the “HTML Extension Files” page for examples.
The following variable can be set as a CGI variable, for navigating between pages:
Variable Name | Meaning |
---|---|
CiBookmarkSkipCount | Signed number of rows to skip for the next page. Negative means skip backward, positive means skip forward. |
The variables below are normally set by CGI program execution and can be referred to in the .idq or .htx files.
Variables Available from CGI Parameters:
HTTP Variable | Meaning |
---|---|
ALL_HTTP | All HTTP headers that were not already parsed into one of the listed variables. These variables are of the form
HTTP_header field name with each variable separated by \r\n, for example: HTTP_ACCEPT: */*, q=0.300, audio/x-aiff, audio/basic, image/jpeg, image/gif, text/plain, text/html HTTP_USER_AGENT: Microsoft Internet Explorer/0.1 (Win32) |
AUTH_TYPE | The type of authorization in use. If the user name has been authenticated by the server, this will contain Basic. Otherwise, it will not be present. |
CONTENT_LENGTH | The number of bytes that the script can expect to receive from the client. |
CONTENT_TYPE | The content type of the information supplied in the body of a POST request. |
GATEWAY_INTERFACE | The revision of the CGI (Common Gateway Interface) specification with which this server complies. The current version is CGI/1.1. |
HTTP_ACCEPT | Special-case HTTP header. Values of the Accept: fields are concatenated, separated by “,”; for example, if the
following lines are part of the HTTP header: accept: */*; q=0.1 accept: text/html accept:
image/jpeg then the HTTP_ACCEPT variable will have a value of: */*; q=0.1, text/html,
image/jpeg . |
PATH_INFO | Additional path information, as given by the client. This comprises the trailing part of the URL after the script name but before the query string (if any). |
PATH_TRANSLATED | This is the value of PATH_INFO, but with any virtual path name expanded into a directory specification. |
QUERY_STRING | The information which follows the question mark (?) in the URL that referenced this script. |
REMOTE_ADDR | The IP address of the client. |
REMOTE_HOST | The hostname of the client. |
REMOTE_USER | This contains the user name supplied by the client and authenticated by the server. |
REQUEST_METHOD | The HTTP request method. |
SCRIPT_NAME | The name of the script program being run. |
SERVER_NAME | The server’s hostname (or IP address) as it should appear in self-referencing URLs. |
SERVER_PORT | The TCP/IP port on which the request was received. |
SERVER_PROTOCOL | The name and version of the information-retrieval protocol relating to this request, usually HTTP/1.0. |
SERVER_SOFTWARE | The name and version of the Web server under which the Internet Server Extension is running. |
Valid Locale Identifiers for Use in CiLocale:
Language | CiLocale String | Win32 Equivalent |
---|---|---|
Chinese | ZH, ZH-CN, ZH-TW | LANG_CHINESE | SUBLANG_CHINESE_SIMPLIFIED |
Bulgarian | BG | LANG_BULGARIAN | SUBLANG_DEFAULT |
Croatian | HR | LANG_CROATIAN | SUBLANG_DEFAULT |
Czech | CS | LANG_CZECH | SUBLANG_DEFAULT |
Danish | DA | LANG_DANISH | SUBLANG_DEFAULT |
Dutch | NL | LANG_DUTCH | SUBLANG_DUTCH |
English (Great Britain) | EN-GB | LANG_ENGLISH | SUBLANG_ENGLISH_UK |
English (US) | EN, EN-US | LANG_ENGLISH | SUBLANG_ENGLISH_US |
Finnish | FI | LANG_FINNISH | SUBLANG_DEFAULT |
French | FR, FR-FR | LANG_FRENCH | SUBLANG_FRENCH |
French (Canadian) | FR-CA | LANG_FRENCH | SUBLANG_FRENCH_CANADIAN |
German | DE | LANG_GERMAN | SUBLANG_GERMAN |
Greek | EL | LANG_GREEK | SUBLANG_DEFAULT |
Icelandic | IS | LANG_ICELANDIC | SUBLANG_DEFAULT |
Italian | IT | LANG_ITALIAN | SUBLANG_ITALIAN |
Japanese | JA | LANG_JAPANESE | SUBLANG_DEFAULT |
Korean | KO | LANG_KOREAN | SUBLANG_DEFAULT |
Neutral (use built-in word breaking) | NEUTRAL | LANG_NEUTRAL | SUBLANG_NEUTRAL |
Norwegian | NO | LANG_NORWEGIAN | SUBLANG_DEFAULT |
Polish | PL | LANG_POLISH | SUBLANG_DEFAULT |
Portuguese | PT | LANG_PORTUGUESE | SUBLANG_DEFAULT |
Portuguese (Brazilian) | PT-BR | LANG_PORTUGUESE | SUBLANG_PORTUGUESE_BRAZILIAN |
Romanian | RO | LANG_ROMANIAN | SUBLANG_DEFAULT |
Russian | RU | LANG_RUSSIAN | SUBLANG_DEFAULT |
Slovak | SK | LANG_SLOVAK | SUBLANG_DEFAULT |
Slovenian | SL | LANG_SLOVENIAN | SUBLANG_DEFAULT |
Spanish | ES, ES-ES | LANG_SPANISH | SUBLANG_SPANISH |
Swedish | SV | LANG_SWEDISH | SUBLANG_DEFAULT |
Turkish | TR | LANG_TURKISH | SUBLANG_DEFAULT |
CiLocale can be specified in the .idq or .ida file. It can also be specified by the browser as the HTTP_ACCEPT_LANGUAGE tag. Values entered in the .idq and .ida files supersede those sent in HTTP_ACCEPT_LANGUAGE. If no value is found in the .idq or .ida file, the value of HTTP_ACCEPT_LANGUAGE is parsed from left to right to find a supported language.
For example:
HTTP_ACCEPT_LANGUAGE=EN, FR, CZ
Note Values are separated by commas.
© 1996 by Microsoft Corporation. All rights reserved.